package cn.edu.zsc.rbac.domain.vo;


import cn.edu.zsc.rbac.domain.enums.RoleDataScope;
import cn.edu.zsc.rbac.domain.util.DateTimeUtils;

import java.time.LocalDateTime;

public class RoleVo extends BaseVo {

    /**
     * 部门名称
     */
    public String name;

    /**
     * 部门数据访问范围
     */
    public RoleDataScope dataScope;

    public RoleVo() {
    }

    public RoleVo(Integer id, LocalDateTime createAt, LocalDateTime updateAt, String name, RoleDataScope dataScope) {
        super(id, createAt, updateAt);
        this.name = name;
        this.dataScope = dataScope;
    }

    @Override
    public String toString() {
        return String.format("ID：%d，名称：%s，数据访问范围：%s，更新时间：%s", id, name, dataScope, DateTimeUtils.format(updateAt));
    }
}
